﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ServiceModel;
using Libraries.Entities;

namespace Libraries
{
    [ServiceContract]
    public interface ITrainingManagerSystemModel
    {
        #region Account-Course
        [OperationContract(Name = "GetAccountCourseByPaging")]
        Collection<AccountCourse> PagingAccountCourse(int pageSize, int pageNumber,
                                                             string accountName, string employeeId, int courseCategoryId,
                                                             string courseName, string fullName,
                                                             string endDateFrom, string endDateTo,
                                                             int accountLocation, int accountStatus,
                                                             int contractType, string roleId, string courseYear, int maxMonth,
                                                             int minMonth, int departmentId);
        [OperationContract]
        Collection<CourseRefund> AccountCourseRefund(string employeeId);

        [OperationContract]
        Collection<CertificateRefund> AccountCertificateRefund(string employeeId);

        #endregion

        #region Account-Certificate

        [OperationContract]
        Collection<AccountCertificate> SearchAccountCertificate(int pageSize, int currentPage,
                                                                int certificateId, string employeeId,
                                                                string certificateProvider, string certificateCategory,
                                                                string accountName, string certificateName,
                                                                string score, bool isCertificateNode, int statusAccountId);

        [OperationContract]
        Collection<Certificate> Certificates();

        [OperationContract]
        Certificate CertificateDetailByCertificateId(int certificateId);
        #endregion

        #region LanguageScore By TruongLM1
        [OperationContract]
        Collection<LanguageScore> PagingLanguageScore(int pageSize, int currentPage, string accountName,
                                                                    string fullName, int? languageTypeId, string score,
                                                                    int departmentId, int statusAccountId, bool final);


        [OperationContract]
        Collection<LanguageScore> LanguageScoresHistory(string accountName);

        [OperationContract]
        Collection<LanguageScore> ListLanguageScoreByLanguageType(int pageSize,int currentPage,int? languageTypeId);

        [OperationContract]
        LanguageScore GetLanguageScoreDetailById(int languageScoreId);

        [OperationContract]
        Collection<LanguageScore> HistoryLanguageScoreByTypeAndEmployeeId(int languageType, string employeeId);

        #endregion

        #region LanguageType By TruongLM1
        [OperationContract]
        Collection<LanguageType> ListAllLanguageType();
        #endregion

        #region Department By TruongLM1

        [OperationContract]
        Collection<Department> ListAllDepartment(int locationId);
		[OperationContract]
        Collection<Department> ListAllDepartmentPaging(int pageSize, int currentPage, int locationId);
        #endregion

        #region StatusAccount By TruongLM1
        [OperationContract]
        Collection<StatusAccount> ListAllStatusAccount();
        #endregion

        #region Account

        [OperationContract(Name = "GetAccountByPaging")]
        ICollection<Account> PagingAccount(string accountName, string fullName,
                                                int? locationId, int? jobTitleId, string employeeId, int? departmentId,
                                                int? contractTypeId, int? statusAccountId, int minMonth, int maxMonth,
                                                int pageNumber, int pageSize);

        [OperationContract(Name = "GetAccountByEmployeeId")]
        Account GetAccountByEmployeeId(string employeeId);

        [OperationContract(Name = "FetchAllLocation")]
        ICollection<Location> FetchAllLocation();

        [OperationContract(Name = "FetchAllContractType")]
        ICollection<ContractType> FetchAllContractType();

        [OperationContract(Name = "FetchAllJobTitle")]
        ICollection<JobTitle> FetchAllJobTitle();

        #endregion


        #region Course
        // Course All course
        [OperationContract]
        Collection<CourseDetails> PagingAllCourse(int pagesize, int currentpage);

        // Course All By CategoryId
        [OperationContract]
        Collection<CourseDetails> PagingAllCourseByCategoryId(int pagesize, int currentpage, int categoryId);
        // Search Course By Category, StartDate, EndDate, CourseYear,CourseName
        [OperationContract]
        Collection<CourseDetails> PagingSearchCourseByCategoryId(int pagesize, int currentpage, int categoryId, string courseName,int? courseYear, string startDate, string endDate);


        [OperationContract]
        Collection<CourseCategory> CourseCategorySearchPaging(string courseCategoryName);
        // Course Category Menu
        [OperationContract]
        Collection<CourseCategory> CourseCategoryFetchAllName();

        // Information CourseInstructor by CourseId
        [OperationContract]
        Collection<CourseInstructor> AllCourseInstructorByCourseId(int courseId);
        // Information CourseFeedBack by CourseId
        [OperationContract]
        Collection<CourseFeedBack> AllCourseFeedBackByCourseId(int courseId);
        // Information Accounts follow Course by CourseId
        [OperationContract]
        Collection<CourseInfomation> AllEmployeeInformationByCourseId(int courseId);
        // Details information of Course by CourseId
        [OperationContract]
        CourseDetails CourseDetailsByCourseId(int courseId);
        #endregion


        #region Article
        /// <summary>
        /// Gets the article paging.
        /// </summary>
        /// <param name="pageSize">Size of the page.</param>
        /// <param name="pageNumber">The page number.</param>
        /// <param name="TotalRecords">The total records.</param>
        /// <returns></returns>
        [OperationContract(Name = "GetArticlePaging")]
        Collection<Article> GetArticlePaging(int pageSize, int pageNumber, out int TotalRecords);

        /// <summary>
        /// Gets the article by id.
        /// </summary>
        /// <param name="articleId">The article id.</param>
        /// <returns></returns>
        [OperationContract(Name = "GetArticleById")]
        Article GetArticleById(int articleId);

        /// <summary>
        /// Updates the article.
        /// </summary>
        /// <param name="article">The article.</param>
        /// <returns></returns>
        [OperationContract(Name = "UpdateArticle")]
        bool UpdateArticle(Article article);

        #endregion


        #region CheckRole
        [OperationContract(Name = "CheckRole")]
        bool CheckRole(string accountName,string function);
        #endregion


        #region

        [OperationContract]
        Collection<CourseInstructor> FetchAllByInstructorId(string instructorId);

        #endregion


    }
}